const TokenKey = 'x-access-token'
var inFifteenMinutes = new Date(new Date().getTime() + 120 * 60 * 1000);
export function getToken() {
    return uni.getStorageSync(TokenKey);
}

export function setToken(token) {
    return uni.setStorageSync(TokenKey, token, { expires: inFifteenMinutes })
}

export function removeToken() {
    return uni.removeStorageSync(TokenKey)
}
const UserInfoKey = 'x-access-userinfo'
export function setUserInfo(userInfo){
	return uni.setStorageSync(UserInfoKey, userInfo)
}

export function getUserInfo(userInfo){
	return uni.getStorageSync(UserInfoKey);
}

export function removeUserInfo(userInfo){
	return uni.removeStorageSync(UserInfoKey);
}